package com.zj.study.map;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author 赵赳
 * @since 2021/12/16 17:29
 */
public class TestMap {

  public static void main(String[] args) {
    MyHashMap<String, String> map = new MyHashMap<>();
    map.put("a", "b");
    map.put("b", "c");
    map.put("d", "e");
    System.out.println("map = " + map);


    Map<String, String> hashMap = new HashMap<>();
    hashMap.put("a", "b");
    hashMap.put("b", "c");
    hashMap.put("d", "e");
    System.out.println("hashMap = " + hashMap);

   /* for (int i = 0; i < 100; i++) {
      map.put("刘华强" + i, "你这瓜保熟吗？" + i);
    }
    System.out.println(map.size());

    for (int i = 0; i < 100; i++) {
      System.out.println(map.get("刘华强" + i));
    }*/

    List<Object> list = new ArrayList<>();
    list.add("a");
    System.out.println("list = " + list);

    var objects = list.toArray();
    System.out.println("objects = " + Arrays.toString(objects));


  }

}
